package pl.edu.pw.polygen.modeler.client.toolbox.command;

import pl.edu.pw.polygen.modeler.client.workspace.IWorkspace;
import pl.edu.pw.polygen.modeler.client.workspace.listener.SelectListener;

public class MergeCommand implements ICommand {

	private IWorkspace workspace;

	public MergeCommand(IWorkspace workspace) {
		this.workspace = workspace;
	}

	@Override
	public void execute() {
		workspace.dropAll();
		workspace.unselectAll();
		workspace.setMergeable();
		workspace.setWorkspaceListener(new SelectListener(workspace));
	}

}
